﻿ 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Configuration;
using IDAL;
using System.Reflection;

namespace DalFactory
{
    public partial class AbstractFactory
    {
      
   
		
	    public static IActionInfoDal CreateActionInfoDal()
        {

            string classFulleName = dalNamePlace + ".ActionInfoDal";


            //object obj = Assembly.Load(ConfigurationManager.AppSettings["DalAssembly"]).CreateInstance(classFulleName, true);
            var obj  = CreateInstance(classFulleName);


            return obj as IActionInfoDal;
        }
		
	    public static IDepartmentDal CreateDepartmentDal()
        {

            string classFulleName = dalNamePlace + ".DepartmentDal";


            //object obj = Assembly.Load(ConfigurationManager.AppSettings["DalAssembly"]).CreateInstance(classFulleName, true);
            var obj  = CreateInstance(classFulleName);


            return obj as IDepartmentDal;
        }
		
	    public static IDepartmentUserMapperDal CreateDepartmentUserMapperDal()
        {

            string classFulleName = dalNamePlace + ".DepartmentUserMapperDal";


            //object obj = Assembly.Load(ConfigurationManager.AppSettings["DalAssembly"]).CreateInstance(classFulleName, true);
            var obj  = CreateInstance(classFulleName);


            return obj as IDepartmentUserMapperDal;
        }
		
	    public static IRoleActionMapperDal CreateRoleActionMapperDal()
        {

            string classFulleName = dalNamePlace + ".RoleActionMapperDal";


            //object obj = Assembly.Load(ConfigurationManager.AppSettings["DalAssembly"]).CreateInstance(classFulleName, true);
            var obj  = CreateInstance(classFulleName);


            return obj as IRoleActionMapperDal;
        }
		
	    public static IRoleInfoDal CreateRoleInfoDal()
        {

            string classFulleName = dalNamePlace + ".RoleInfoDal";


            //object obj = Assembly.Load(ConfigurationManager.AppSettings["DalAssembly"]).CreateInstance(classFulleName, true);
            var obj  = CreateInstance(classFulleName);


            return obj as IRoleInfoDal;
        }
		
	    public static IUserActionMapperDal CreateUserActionMapperDal()
        {

            string classFulleName = dalNamePlace + ".UserActionMapperDal";


            //object obj = Assembly.Load(ConfigurationManager.AppSettings["DalAssembly"]).CreateInstance(classFulleName, true);
            var obj  = CreateInstance(classFulleName);


            return obj as IUserActionMapperDal;
        }
		
	    public static IUserInfoDal CreateUserInfoDal()
        {

            string classFulleName = dalNamePlace + ".UserInfoDal";


            //object obj = Assembly.Load(ConfigurationManager.AppSettings["DalAssembly"]).CreateInstance(classFulleName, true);
            var obj  = CreateInstance(classFulleName);


            return obj as IUserInfoDal;
        }
		
	    public static IUserRoleMapperDal CreateUserRoleMapperDal()
        {

            string classFulleName = dalNamePlace + ".UserRoleMapperDal";


            //object obj = Assembly.Load(ConfigurationManager.AppSettings["DalAssembly"]).CreateInstance(classFulleName, true);
            var obj  = CreateInstance(classFulleName);


            return obj as IUserRoleMapperDal;
        }
	}
	
}